package com.whutosa.template.server.dao;

import com.whutosa.template.server.model.Person;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

/**
 * Created by 19110 on 2016/9/12.
 */
@Repository
public interface PersonDao extends PagingAndSortingRepository<Person, Integer>, JpaSpecificationExecutor<Person> {

    /**
     * 自定义查询方法
     *
     * @param name
     * @param pageable
     * @return
     */
    Page<Person> findByNameLike(String name, Pageable pageable);
}
